'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = (app) => {
    const { router, controller } = app;
    router.get('/', controller.home.index);

    // 注册登录
    router.post('/login', controller.home.login);
    router.post('/register', controller.home.register);

    // 记账接口
    router.post('/bills', controller.bill.create);
    router.get('/bills', controller.bill.index);
    // router.get('/bills/:id', controller.bill.detail);
    // router.put('/bills/:id', controller.bill.update);
    // router.delete('/bills/:id', controller.bill.destroy);
};
